#include "knl_Config.h"


namespace knl
{
	knl_Config::knl_Config(void)
	{
	}


	knl_Config::~knl_Config(void)
	{
	}

	bool knl_Config::parseConfig( const knlString _fileName )
	{
		std::ifstream	_config(_fileName);

		if (_config.is_open() == false)
		{
			return false;
		}

		std::string	strline;
		knlSplitVEC _vec;
		while(std::getline(_config,strline))
		{

			boost::trim(strline);
			if (strline[0] == '#')
				continue;

			knl_configValue::splitString(strline,"=",_vec);

			if (_vec.size() != 2)
				continue;


			m_value.insert(std::make_pair(_vec[0],_vec[1]));
		};

		_config.close();
		return true;
	}

};